Skip to content

refactor(frontend-oracle-design): graph-loaded reference nodes with shared common file and review-point links - #5

Merged
lodado merged 5 commits into
mainfrom
claude/oracle-design-modular-load-kmdhke
Aug 22, 2026
Merged

refactor(frontend-oracle-design): graph-loaded reference nodes with shared common file and review-point links#5
lodado merged 5 commits into
mainfrom
claude/oracle-design-modular-load-kmdhke

Conversation

@lodado

@lodado lodado commented Aug 22, 2026

Copy link
Copy Markdown
Owner

What changed

  • Split the three largest references into on-demand graph nodes: oracle-card.mdcard/{policy-sources,risk-grill,card-format,confirmation-lock}.md, implementation-loop.mddelivery/{ledger,red,implementation-decision,green-review}.md, type-constraints.mdtypes/{state-ladder,authoring,api-surface,review-criteria}.md.
  • Added references/reference-graph.json: every reference is a node with a load condition (when) and co-load dependency edges (requires); SKILL.md's loading section follows the graph so each phase reads only its nodes.
  • Added references/common.md as the single canonical owner of the authority priority order, recognized policy sources, jurisdiction rules, the six-way feedback routing table, and shared prohibitions; other references now point at it instead of duplicating those blocks.
  • Review criteria are now passed to reviewers as file links: repeatable --review-point on oracle-run.mjs review-packet records path + SHA-256 only (no pasted text), with the condition → criteria-file routing table in subagent-review.md and machine-readable reviewPoints in the graph.
  • Routed the Low fast path through the graph as an explicit exclusive lane (references/lanes/low-fast-path.md) with entry conditions and disqualification-escalation rules.
  • Compacted graph manifest JSONs and trimmed residual duplication; kept bva.md byte-identical with the test package. Released 0.18.4.

Why

  • The skill loaded oversized monolithic references (458/434/375 lines) regardless of which phase needed them, and the same authority/routing definitions were restated in 4+ files, drifting independently.
  • Per-stage loaded context drops: card-writing start 829 → 540 lines, Delivery entry 1,155 → 148, type work 434 → 300; total reference lines stay at 3,971 vs 3,931 before (+40 for the new lane contract, common file, and review-point routing).

How tested

  • Unit tests pass (pnpm test)
  • Build succeeds (pnpm build)
  • Type check passes (pnpm typecheck)
  • Lint passes (pnpm lint)
  • Manual testing completed

Test details

  • packages/frontend-oracle-design: node --test skills/scripts/*.test.mjs — 121 pass, 0 fail (contract tests updated to read node concatenations; new tests validate the graph — unique ids, resolvable edges, complete file coverage — the common-file dedup, review-point link recording, and the low-fast-path lane).
  • packages/test: node --test scripts/*.test.mjs — 3 pass, 0 fail (bva.md byte-equality with the oracle package preserved).
  • oracle-run.mjs review-packet --review-point functional test: link-only packet field (path + sha256, no content), missing/empty/duplicate points rejected with REVIEW_POINT_INVALID.
  • oracle-workflow.graph.json re-serialization verified content-identical by JSON parse equality; bundled graph-verify still returns GRAPH_VALID.
  • All relative markdown links across the skill verified to resolve; markdown/JSON normalized through the repo prettier config.

Risk

Risk Level Description
Low Documentation/manifest restructure of one plugin plus an additive optional CLI flag; no runtime behavior change to lock/exec/transition paths, and the full contract test suite pins the moved content.

Affected areas

  • Core library (packages/sdui-template)
  • Component library (packages/sdui-template-component)
  • Documentation (apps/docs)
  • Examples (apps/nextAuthOauthLoginExample)
  • Other: packages/frontend-oracle-design (skill references, contract tests, oracle-run.mjs), .claude-plugin/marketplace.json

Rollback plan

  1. Revert this PR: git revert <merge-commit-hash>
  2. The revert restores the old single-file references, tests, and 0.17.6 version metadata together, so no partial state remains.

Checklist

  • I have read the CLAUDE.md guidelines
  • My code follows the project's code style
  • I have added tests for my changes (if applicable)
  • All new and existing tests pass
  • I have updated documentation (if applicable)

🤖 Generated with Claude Code

https://claude.ai/code/session_01RRu1pxas722y7uzbER5CL3

claude added 4 commits August 22, 2026 10:34
…nodes with a shared common file

- Add references/reference-graph.json: every reference is a node with a load
  condition (when) and co-load dependency edges (requires); SKILL.md loading
  section now follows the graph so only the nodes a phase needs are read.
- Add references/common.md as the single canonical owner of the authority
  priority order, recognized policy sources, jurisdiction rules, the six-way
  feedback routing table, and shared prohibitions; changeability,
  frontend-implementation, subagent-review, visual-design, and the delivery
  nodes now point at it instead of duplicating those blocks.
- Split oracle-card.md into card/{policy-sources,risk-grill,card-format,
  confirmation-lock}.md, implementation-loop.md into delivery/{ledger,red,
  implementation-decision,green-review}.md, and type-constraints.md into
  types/{state-ladder,authoring,api-surface,review-criteria}.md so each
  phase loads only its slice.
- Keep bva.md byte-identical (shared with the test package) and keep
  single-topic references at their existing paths.
- Update contract tests to read node concatenations, validate the graph
  (unique ids, resolvable edges, complete file coverage), and assert the
  common-file dedup; release 0.18.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RRu1pxas722y7uzbER5CL3
…le links

- Add repeatable --review-point to oracle-run.mjs review-packet: each point
  is validated (exists, regular file, non-empty, no duplicates) and recorded
  in the packet as path + SHA-256 only — the reviewer follows the link and
  reads the file itself, and the digest pins which criteria revision was used.
- Document the review-point routing table in subagent-review.md (diff
  condition → criteria file link) and forbid pasting criteria text into the
  reviewer prompt; SKILL.md review loading bullet points at the flag.
- Declare the same condition → node routing machine-readably as
  reviewPoints in reference-graph.json.
- Cover with a functional oracle-run test (link-only packet field, invalid/
  empty/duplicate points rejected) and a contract test (docs, flag, graph
  routing resolves); release 0.18.1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RRu1pxas722y7uzbER5CL3
…erence graph as an exclusive lane

- Add references/lanes/low-fast-path.md owning the lane contract: entry
  conditions, procedure (repo verifications still run), what is skipped
  (card/lock/ledger/review), and explicit disqualification-escalation rules
  into the oracle lane.
- Declare a machine-readable lanes section in reference-graph.json: the Low
  lane loads only its node (exclusive) with an escalation rule; the oracle
  lane enters at common.
- SKILL.md now routes risk=Low to the lane node in both the entry rule and
  the loading graph, deduplicating the previous double description;
  card/risk-grill.md and delivery/ledger.md link the lane instead of
  restating it.
- Contract test covers the lane file sections, graph lane resolution, and
  routing links; release 0.18.2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RRu1pxas722y7uzbER5CL3
…anonical owners

- SKILL.md feedback-routing section keeps the six classification names but
  drops the arrow table duplicated verbatim in common.md.
- card/risk-grill.md UI design gate keeps the load trigger and lock rule but
  drops the bullets restating visual-design.md's proposal/two-pass/--source
  rules, which that file owns.
- subagent-review.md checklist drops the type/state items now delivered as
  review-point links (types/review-criteria.md, frontend-implementation.md)
  and replaces them with a single do-not-repeat pointer item.
- Update the two affected test pins; release 0.18.3.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RRu1pxas722y7uzbER5CL3

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a7e4de4f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
// 링크만 전달한다 — reviewer가 경로의 파일을 직접 전부 읽고, digest로 어떤
// revision의 기준을 읽었는지 고정한다. 본문을 packet에 복제하지 않는다.
reviewPoints.push({ path: point, sha256: sha256(content) })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist the resolved review-point path

When --review-point is supplied as a relative path and the reviewer reads the packet from a different working directory, validation hashes pointPath resolved against the generator's cwd but the packet stores the original relative point. The reviewer can therefore fail to open the criterion or read a different file, so the recorded digest no longer fixes the linked review input. Store the resolved/canonical path, or make it relative to a stable packet or scan root.

Useful? React with 👍 / 👎.

…the split's line overhead

- Serialize oracle-workflow.graph.json edges one per line (content-identical
  JSON, verified by parse equality; graph-verify still passes): 602 -> 317
  lines.
- Slim reference-graph.json: drop the decorative phase field and shorten
  node when strings to compact phrases — the full load-condition sentences
  are owned by SKILL.md's loading section, so the duplication goes away too.
- Normalize all skill markdown/json through the repo prettier config.
- Net: references + SKILL total is 3,971 lines vs 3,931 before the split
  (+40), while per-stage loaded context stays reduced; release 0.18.4.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RRu1pxas722y7uzbER5CL3
@lodado lodado changed the title refactor(frontend-oracle-design): split references into graph-loaded nodes with a shared common file refactor(frontend-oracle-design): graph-loaded reference nodes with shared common file and review-point links Aug 22, 2026
@lodado
lodado merged commit a16a8cc into main Aug 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants